﻿using Sino.CapacityCloud.Repositories.Models;
using Sino.Tms.Primitives;
using Sino.Tms.WebApi.Framework.Abstractions;
using Sino.Tms.WebApi.Framework.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Sino.CapacityCloud.Services
{

    public interface ITmsServiceBus
        : ISmsService, IEvaluationService, IFeeService, IOrderService, ITmsServiceClient, IUserService
    {

        Task<PageVM<Order>> GetOrdersAsync(string shipaddress = null, string deliveraddress = null, DateTime? shipstarttime = null, DateTime? shipendtime = null, int skip = 0, int count = -1);

        Task<PageVM<ConfirmedOrder>> GetMyOrdersAsync(string userId, string carCode, int skip = 0, int count = -1);

        Task<ConfirmedOrder> GetMyOrderDetailsAsync(string carrierOrderId);

        /// <summary>
        /// HttpPost, body with "dfd1e5c9-de27-498a-9610-3ab742f0a06a,dfd1e5c9-de27-498a-9610-3ab742f0a06a"
        /// </summary>
        /// <param name="shipaddress"></param>
        /// <param name="deliveraddress"></param>
        /// <param name="shipstarttime"></param>
        /// <param name="shipendtime"></param>
        /// <param name="skip"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        Task<PageVM<Order>> GetMyInvolvedOrdersAsync(IEnumerable<string> orderIds, string shipaddress = null, string deliveraddress = null, DateTime? shipstarttime = null, DateTime? shipendtime = null, int skip = 0, int count = -1);

        Task<IEnumerable<ConfirmedOrder>> GetCarrierSubOrdersAsync(string carrierOrderId);

        Task<IEnumerable<RatingRecord>> QueryRatingRecordsAsync(string carriedOrderId, string orderId, string carId, string userId);

        Task<IEnumerable<PayableCost>> QueryPayableCostsAsync(string carriedOrderId, string carId, string userId);

    }

}